package org.naivecoders.ai.functions;

import org.naivecoders.ai.types.MaybeBowl;

public class ConditionalFunction extends AbstractFunction{
	
	@Override
	public MaybeBowl evaluate() {
		final AbstractCondition ac = getInput(0);
		if (ac.evaluateCondition()) {
			return ac.getInput(1).evaluate();
		} 
		return ac.getInput(2).evaluate();
	}
}
